package fhp.hlhj.giantfold.presenter

import com.lzy.okgo.model.HttpParams
import fhp.hlhj.giantfold.interfaces.IPhoneRegis
import fhp.hlhj.giantfold.javaBean.GetSmsBean
import fhp.hlhj.giantfold.javaBean.PhoneRegisBean
import fhp.hlhj.giantfold.module.PhoneRegisModule

/**
 * author: FHP
 * data: on 2018\1\10 0010 9:42
 * E-Mail: 103945089@qq.com
 */
class PhoneRegisPresenter(private val iPhoneRegis: IPhoneRegis):PhoneRegisModule.PhoneOverListener {


    private val phoneRegisModule=PhoneRegisModule()

    fun getSmsCode(params: HttpParams){
        phoneRegisModule.getSms(params,this)
    }

    fun phoneRegis(params: HttpParams){
        phoneRegisModule.phoneRegis(params,this)
    }

    override fun showLoading() {
        iPhoneRegis.showLoading()
    }

    override fun over(getSmsBean: GetSmsBean) {
        iPhoneRegis.getSmsCode(getSmsBean)
    }

    override fun overRegis(phoneRegisBean: PhoneRegisBean) {
        iPhoneRegis.regis(phoneRegisBean)
    }

}